
//***********************************************
//
//      Filename: pp6_6.java
//
//        Author: wwb
//        Mails: 1274860621@qq.com
//        Create: 2018-04-09 19:50:22
// Last Modified: 2018-04-09 19:50:22
//***********************************************

public class pp6_6 {
    public static void main(String[] args) {

        Coin myCoin = new Coin();
          String A = "HEADS";
          int num =1;
          int num1 = 0;
          int num2 = 0;

         
          while (num<=100) {
              myCoin.flip();
              if (myCoin.isHeads())
                  num1++;
              else
                  num2++;

              num++;
          }
          System.out.println("\n向上的次数： " + num1 + "\n朝下的次数： " + num2 );


    }
}

